package com.topnav.mc.admin.dao.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.topnav.mc.admin.entity.GbCodeCity;
import com.topnav.mc.admin.entity.GbCodeNetIdentity;
import com.topnav.mc.admin.entity.bean.GbCodeNetIdentityBean;
import com.topnav.mc.base.mc.McMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface GbCodeNetIdentityMapper extends McMapper<GbCodeNetIdentity, GbCodeNetIdentityBean,GbCodeNetIdentity> {
    String commSql = " SELECT *, CONCAT(name,'(',id,')') AS  netIdentityName " +
            " FROM mc_code_net_identity " +
            " ${ew.customSqlSegment}";

    @Select(commSql)
    GbCodeNetIdentityBean selectInfoOne(@Param(Constants.WRAPPER) Wrapper queryWrapper);

    @Select(commSql)
    List<GbCodeNetIdentityBean> selectInfoList(@Param(Constants.WRAPPER) Wrapper queryWrapper);

    @Select(commSql)
    Page<GbCodeNetIdentityBean> selectInfoPage(Page<GbCodeNetIdentity> page, @Param(Constants.WRAPPER) Wrapper queryWrapper);
}
